<?php  
session_start();
require_once($_SERVER['DOCUMENT_ROOT'].'/mpd/config/config.php');


if($_POST["button"] == "Save") {
	$nip = $_POST['nip'];
	$nama = $_POST['nama'];
	$password = $_POST['newpassword'];
	$departemen = $_POST['departemen'];
	$team = $_POST['team'];
	$atasan = $_POST['atasan'];
	$status = $_POST['status'];
	$jenis = $_POST['jenis'];

	$query=("UPDATE biodata SET NAMA = '$nama' , PASSWORD_PEGAWAI = '$password' , ID_DEPARTEMEN = '$departemen', ID_TEAM = '$team' , BIO_NIP = '$atasan' , ID_STATUS ='$status' , ID_ROLE='$jenis' WHERE NIP ='$nip'");
	
	
	$result=mysql_query($query);
	//var_dump($result);
	
	header('Location: /mpd/ad/view/index.php');

}

?>